home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- PATH=/boot/bin:/pkg/bin:/pkg/sbin:/pkg/rc:/rc:/bin:/sbin:/etc:/tmp:.:%builtin
- export PATH
- . /etc/system.cfg
- . /etc/live.cfg
- . /etc/chat.pwd
-
- for i in 1 2 3 4 5 6 7 8 9 10; do
- a="1.1.1.$i"
- if [ "$4" = "$a" ]; then
- exit 0
- fi
- done
- echo "Your inet addr: $4<br>ISP P-t-P: $5" >/tmp/state
- if [ -f /etc/ppp/resolv.conf -a "$USEPEERDNS" != n ]; then
- set --`cat /etc/ppp/resolv.conf |sed 's/nameserver//'`
- [ "$1" ] && a="DNSADDR=$1"
- [ "$2" ] && b="DNSADDR1=$2"
- cat >/etc/live.cfg <<-EOF
- ROUTER=$ROUTER
- BOOTMOD=$BOOTMOD
- VERSION=$VERSION
- BOOTDEV=$BOOTDEV
- BOOTIME="$BOOTIME"
- $a
- $b
- EOF
- fi
- rc_main newip
- exit 0
-